import React from 'react'
import {Form,Button,Input} from "antd-mobile"
import { useNavigate } from 'react-router-dom';

function Home() {
    const navigate=useNavigate();
    const onFinish=(value)=>{
        console.log(value);
        navigate('/list',{state:value})
    }
  return (
    <div>
      <Form onFinish={onFinish} initialValues={{start:"北京",end:"三亚"}} layout='horizontal' footer={
          <Button block type='submit' color='primary' size='large'>
            查询
          </Button>
        }>
        <Form.Item label='开始' name='start'>
            <Input></Input>
        </Form.Item>
        <Form.Item label='结束' name='end'>
            <Input></Input>
        </Form.Item>
      </Form>
    </div>
  )
}

export default Home
